﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;

namespace doveData
{
    public class Vector2
    {
        public Vector2(float x, float y)
        {
            this.x = x;
            this.y = y;
        }



        private float x;
        private float y;
        public float X
        {
            get { return x; }
        }
        public float Y
        {
            get { return y; }
        }

        public static double Distance(Vector2 from,Vector2 to)
        {
            double x =Math.Pow(Math.Abs(from.X - to.X),2);
            double y = Math.Pow(Math.Abs(from.Y - to.Y),2);
            return Math.Sqrt(x+y);
        }

        public override string ToString()
        {
            string s="";
            s = "X:" + x + "Y:" + y;
            return s;
        }

    }
}
